<div class="panel panel-default">
  <!-- Default panel contents -->
  <div class="panel-heading">专项单店基金-项目活动
  </div>
  <table class="table">
    <thead>
      <tr>
        <th class="bg-primary text-center">项目编号</th>
        <th class="bg-primary text-center">项目名称</th>
        <th class="bg-primary text-center">标准动作</th>
        <?php /*?>
        <th class="bg-primary text-center">基金类型</th>
        <?php */?>
        <th class="bg-primary text-center">活动类型</th>
        <th class="bg-primary text-center">预算总费用</th>
        <th class="bg-primary text-center">预算审核金额</th>
        <th class="bg-primary text-center">明细</th>
        <th class="bg-primary text-center">结算申请金额</th>
        <th class="bg-primary text-center">结算审核情况</th>
        <th class="bg-primary text-center">结算审核金额</th>
        <?php if ( in_array($action, array('audit')) ) {?>
        <th class="bg-primary text-center">项目一键审核</th>
        <?php } ?>
      </tr>
    </thead>
    <tbody>
    <?php foreach($projectList as $k => $v): ?>
      <tr>
        <td class="text-center"><?php echo $v['id']; ?></td>
        <td class="text-center"><?php echo $v['projectName']; ?></td>
        <td class="text-center"><?php echo $v['actionTypeStr'] ?></td>
        <?php /*?>
        <td class="text-center"><?php echo $v['fundTypeStr'] ?></td>
        <?php */?>
        <td class="text-center"><?php echo $v['eventTypeStr'].'-'.$v['eventClassStr'] ?></td>
        <td class="text-center"><?php echo $v['budgetApply'] ?></td>
        <td class="text-center"><?php echo $v['budgetAudit'] ?></td>
        <td class="text-center">
          <?php if ( in_array($action, array('edit')) ) {?>
            <a class="btn btn-default" type="button" onclick="newWindow('结算申请', '<?=printUrl('SpecialProject','settleSubmit', array('procId'=>$v['procId'],'projectId'=>$v['id']))?>', 1100, 600)">结算申请</a>
          <?php } ?>
          <?php if ( in_array($action, array('audit')) ) {?>
          <a class="btn btn-default" type="button" onclick="newWindow('项目审核', '<?=printUrl('SpecialProject','settleAudit', array('procId'=>$v['procId'],'projectId'=>$v['id']))?>', 1100, 600)">结算审核</a>
          <?php } ?>
          <?php if ( in_array($action, array('change')) ) {?>
            <a class="btn btn-default" type="button" onclick="newWindow('修改金额', '<?=printUrl('SpecialProject','settleChange', array('procId'=>$v['procId'],'projectId'=>$v['id']))?>', 1100, 600)">修改金额</a>
          <?php } ?>
          <?php if ( in_array($action, array('check')) ) {?>
            <a class="btn btn-default" type="button" onclick="newWindow('项目查看', '<?=printUrl('SpecialProject','settleCheck', array('procId'=>$v['procId'],'projectId'=>$v['id']))?>', 1100, 600)">查看</a>
          <?php } ?>
        </td>
        <td class="text-center"><?php echo $v['settleApply'] ?></td>
        <td class="text-center"><?php echo $v['settleAuditStr'] ?></td>
        <td class="text-center"><?php echo $v['settleAudit'] ?></td>
        <?php if (in_array($action, array('audit'))) {?>
        <td class="text-center">
          <?php
          $options = $this->config->item('settleAuditOptions');
          $extra = ' class="form-control settleAuditRs" style="width:70px;" money="'.((float)$v['settleAudit'] ? $v['settleAudit'] : $v['settleApply']).'" ';
          if ($v['settleAuditDetail'] == 1 || $this->user['userRole'] < $v['settleAuditRole']) {
            $extra .= " disabled";
          }
          echo form_dropdown('project['.$v['id'].'][settleAuditRs]', $options, $v['settleAuditRs'], $extra);
          ?>
        </td>
        <?php } ?>
      </tr>
    <?php endforeach; ?>
    </tbody>
  </table>
</div>